using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;

namespace Silvery.Command
{
    public class Cmd_Help : StandardCommand
    {
        public Cmd_Help(List<IGameCommand> commands)
        {
            Commands = commands;
            this.Command = "help";
            base.Instruction = "指令帮助";
        }
        private List<IGameCommand> Commands;
        public override void Execute(IGameCommandBox parent, string parameter)
        {
            Commands.Sort();
            parent.WriteLineToOutput("=+= Help =+==========================");
            foreach (var cmd in Commands)
            {
                Run run = new Run();
                run.Text = "    " + cmd.Command + " " + cmd.Instruction;
                parent.WriteLineToOutput(run);
            }
            parent.WriteLineToOutput("===================================");
            base.Execute(parent, parameter);
        }
        

    }

}
